﻿using ClientOverflow.DataTransferObjects;
using ClientOverflow.ViewModels.Services;

namespace ClientOverflow.ViewModels.QuestionViewViewModels
{
    /// <summary>
    /// VoteQuestionDownCommand is a command in charge of updating a vote down to a question by a user.
    /// The vote is sent to the server through a WCF service.
    /// </summary>
    public class VoteQuestionDownCommand : VoteQuestionCommandBase
    {
        public VoteQuestionDownCommand(Question question) : base(question)
        {
        }
        
        protected override void Vote(IClientOverflowService serviceClient, User votingUser)
        {
            serviceClient.AddQuestionVoteDown(question, votingUser);
        }

    }
}